<template>
	<view class="type md6Text Han">
		<text v-for="(type,typeIndex) in typeList" :key="typeIndex" :class="current == typeIndex?'active':''" @click="getTypeMsg(type,typeIndex)">{{type.name}}
		 
		</text>
		
		
	</view>
</template>

<script>
	export default {
		data(){
			return {
				typeList:[
					{name:'全部'},
					{name:'招呼'},
					{name:'沟通中'}
				],
				current:0
			}
		},
		
		methods:{
			getTypeMsg(item,index){
				console.log(index,this.current);
				this.current = index;
				this.$emit('getCurrentType',index);
			}
		}
	}
</script>

<style scoped lang="less">
	.type{
		width: 100%;
		height: 86upx;
		background-color: #fff;
		line-height: 86upx;
		padding-left:32upx;
		text{
			color: #999999;
			padding-right: 34upx;
		}
		
		.active{
			color:#3465B1 !important;
			font-size: 30upx;
		}
		
	}
	
	
</style>
